<template>
    <div v-if="!hasPerms('customer:student:see')">
        <div class="head">
            <h1>意向客户  新疆和田</h1>
        </div>
         <div class="second-contain-box ma">
            <el-row v-for="item in stuTableData" v-bind:key="item.index">
                <el-col :span="8"><span>跟进次数{{item.name}}</span></el-col>
                <el-col :span="8"><span>跟进时间{{item.schoolname}}</span></el-col>
                <el-col :span="8"><span>学籍号：{{item.OEM}}</span></el-col>
            </el-row>
                <el-row v-for="item in stuTableData" v-bind:key="item.index">
                <el-col :span="8"><span>学制：{{item.schoolsystem}}</span></el-col>
                <el-col :span="8"><span>就读年级：{{item.grade}}</span></el-col>
                <el-col :span="8"><span>账号：{{item.stunumber}}</span></el-col>
            </el-row>
                <el-row v-for="item in stuTableData" v-bind:key="item.index">
                <el-col :span="8"><span>家长姓名：{{item.parentsname}}</span></el-col>
                <el-col :span="8"><span>联系电话：{{item.phone}}</span></el-col>
                <el-col :span="8"><span>客户来源：{{item.customersource}}</span></el-col>
            </el-row>
                <el-row v-for="item in stuTableData" v-bind:key="item.index">
                <el-col :span="24"><span>地区：{{item.address}}</span></el-col>
            </el-row>
        </div>
        <!-- <kt-button class="stu-btn" :label="$t('action.close')" perms="" size="medium" @click="handleClose()" /> -->
    </div>
</template>
<script>
import { hasPermission } from "@/permission/index.js";
import axios from "axios";
import KtButton from "@/views/Core/KtButton";
import api from "@/http/api";
import CrmTable from "@/views/Core/CrmTable";
export default {
  name: "XuecooFollow",
  components: {
    KtButton,
    CrmTable
  },
  data() {
    return {
      filters: {
        name: ""
      },
      selection: false,
      stuTableData: [],
      kemu: ["语文", "语文", "语文", "语文", "语文", "语文", "语文"],
      // 客户跟进数据
      followdata: [],
      columns: [
        { prop: "id", label: "序号", minWidth: 50 },
        { prop: "usernumber", label: "跟进时间", minWidth: 80 },
        { prop: "name", label: "联系人", minWidth: 80 },
        { prop: "OEM", label: "沟通形式", minWidth: 80 },
        { prop: "OEMcategory", label: "客户类型", minWidth: 100 },
        { prop: "role", label: "客户进展", minWidth: 70 },
        { prop: "threeDepartment", label: "下次跟进时间", minWidth: 100 }
      ],
      pageResult: {},
      pageRequest: { pageNum: 1, pageSize: 8 },
      editLoading: false
    };
  },
  watch: {
    $route: "getParams"
  },
  beforeMount: function() {
    //   请求页面传过来的ID根据ID发送请求
    let routerParams = this.$route.query;
    console.log(routerParams.id);
    api.user.findPage(routerParams.id).then(res => {
      let data = [];
      data.push(res.data.content[0]);
      this.stuTableData = data;
    });
  },
  methods: {
    hasPerms: function(perms) {
      // 根据权限标识和外部指示状态进行权限判断
      return hasPermission(perms) & !this.disabled;
    },
    handleClose() {
      this.$router.push({ path: "/Customer/Xuecoo" });
    },
    // 获取分页数据
    findPage: function(data) {
      if (data !== null) {
        this.pageRequest = data.pageRequest;
      }
      this.pageRequest.columnFilters = {
        name: { name: "name", value: this.filters.name }
      };
      this.$api.user
        .findPage(this.pageRequest)
        .then(res => {
          this.pageResult = res.data;
        })
        .then(data != null ? data.callback : "");
    },
    handleFollow(params) {
      this.followdata = Object.assign({}, params.row);
      console.log("asad");
    }
  },

  mounted() {}
};
</script>
<style lang='scss' scoped>


</style>
<style lang="scss">

</style>






